<?php
include("include/conn.php");
require('include/Smarty/libs/Smarty.class.php');

$garnuMasterIdArray  = array();
$garnuText2Tot       = 0;
$garnuName           = "";

//// Listing of Garnu Other Data : Starts
$selectGarnuQuery = "SELECT garnuother.garnuOtherId,garnuother.garnuMasterId,garnuother.text1,garnuother.text2,garnumaster.garnuName
                       FROM garnuother
                       JOIN garnumaster
                      WHERE garnuother.garnuMasterId = garnumaster.garnuMasterId
                        AND garnuother.garnuMasterId = ".$_GET['garnuMasterId']."
                   ORDER BY garnuOtherId";
$selectGarnuQueryResult = mysql_query($selectGarnuQuery);
$l = 0;
while($garnuRow = mysql_fetch_array($selectGarnuQueryResult))
{
  $garnuMasterIdArray[$l]['garnuOtherId']  = $garnuRow['garnuOtherId'];
  $garnuMasterIdArray[$l]['garnuMasterId'] = $garnuRow['garnuMasterId'];
  $garnuName                               = $garnuRow['garnuName'];
  $garnuMasterIdArray[$l]['text1']         = $garnuRow['text1'];
  $garnuMasterIdArray[$l]['text2']         = $garnuRow['text2'];
  $garnuText2Tot                          += $garnuRow['text2'];
  $l++;
}

//// Listing of Garnu Other Data : Ends

$smarty = new Smarty;
require('bottom.php');
$smarty->assign("garnuMasterIdArray",$garnuMasterIdArray);
$smarty->assign("garnuName",$garnuName);
$smarty->assign("garnuText2Tot",$garnuText2Tot);
$smarty->display("garnuOther.tpl");
?>